package com.golxen.framework.event.condition;

import com.golxen.framework.event.condition.dao.ConditionDaoImpl;
import com.golxen.framework.event.condition.dao.entity.ConditionInfo;
import com.golxen.framework.manager.TempMgr;

import java.util.Map;

public class ConditionMgr extends TempMgr {


	private static Map<Integer, ConditionInfo> conditionMap;

	@Override
	public boolean stop() {
		return false;
	}

	@Override
	public boolean save() {
		return false;
	}

	@Override
	public boolean reloadConfig() {
		conditionMap = new ConditionDaoImpl().getTaskConditionInfoMap();

		return true;
	}

	@Override
	public boolean reloadData() throws Exception {
		return true;
	}


	public static ConditionInfo getConditionById(int conditionId) {
		return conditionMap.get(conditionId);
	}

	public static Map<Integer, ConditionInfo> getCondition() {
		return conditionMap;
	}


}
